package org.mycub.server.data.models;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
import com.google.code.morphia.annotations.Indexed;
import com.google.code.morphia.utils.IndexDirection;

@Entity("stationTram")
public class TramStation {

	@Id private String id; 
	@Indexed(IndexDirection.GEO2D) private Double[] location = new Double[2];
	private String line;
	private String name;
	private String address;
	
	
	public TramStation(){
		this.setId("" + -1);
	}
	
	public Double[] getLocation() {
		return location;
	}
	public void setLocation(Double[] location) {
		this.location = location;
	}
	
	public double getLongitude(){
		return this.getLocation()[0];
	}
	
	public void setLongitude(double longitude){
		this.getLocation()[0] = longitude;
	}
	
	public double getLatitude(){
		return this.getLocation()[1];
	}
	
	public void setLatitude(double latitude){
		this.getLocation()[1] = latitude;
	}
	
	public String getLine() {
		return line;
	}
	public void setLine(String line) {
		this.line = line;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
}
